package adv7;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.net.*;

public class AdvancedServer {
	public static void main(String[] args) {

		try {
			ServerSocket st = new ServerSocket(6666);
			System.out.println("服务器启动成了。。。");
			while (true) {
				Socket s = st.accept();
				// new ChatThread(s).start();
				// new LoginThread(s).start();
				// new ObjectThread(s).start();
				new FileSendThread(s).start();
			}
		} catch (IOException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

	}
}
